package com.neutech.neudoc.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.neutech.neudoc.service.DocService;
import com.neutech.po.Doc;



@RestController
@RequestMapping("/his/doc")
public class DocController {
	@Autowired
	private DocService docService;
	//查询
	@RequestMapping(value="/inquireDoc",method=RequestMethod.POST)
	public Doc inquireDoc(Integer id){
		Doc doc=docService.inquireDoc(id);
		return doc;
	}
	//增加
	@RequestMapping(value="/increaseDoc",method=RequestMethod.POST)
	public Doc increaseDoc(Doc doc){
		 doc=docService.increaseDoc(doc);
		return doc;
	}
	//删除
	@RequestMapping(value="/deleteDoc",method=RequestMethod.POST)
	public Doc deleteDoc(Doc doc){
		doc=docService.deleteDoc(doc);
		return doc;
	}
	//修改
	@RequestMapping(value="/updateDoc",method=RequestMethod.POST)
	public Doc updateDoc(Doc doc){
		 doc=docService.updateDoc(doc);
		return doc;
	}
}
